<?php
/**
 * @Name  : UserRoleModel.php
 * @Author: yashuai<1762910894@qq.com>
 */

namespace App\Http\Model\Rbac;

use App\Http\Model\BaseModel;

class UserRoleModel extends BaseModel
{

    protected $primaryKey = 'ID';

    protected $table = 'admin_user_role';

    /**
     * 关联用户角色
     */
    public function role()
    {
        return $this->hasOne(RoleModel::class, 'RoleID', 'RoleID')
            ->select(['RoleID', 'RoleName', 'RoleDesc']);
    }

}
